//
//  AppIntroduceViewController.m
//  Application
//
//  Created by 薛小刚 on 2017/12/22.
//  Copyright © 2017年 薛小刚. All rights reserved.
//

#import "AppIntroduceViewController.h"
#import "AppIntroduceBackView.h"
#import "AppDelegate.h"

@interface AppIntroduceViewController ()<AppIntroduceBackViewDelegate>

@end

@implementation AppIntroduceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
    AppIntroduceBackView * appIntroduce = [[AppIntroduceBackView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    [self.view addSubview:appIntroduce];
    appIntroduce.delegate = self;
}

- (void) startApplication {
    NSString * version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    [[NSUserDefaults standardUserDefaults] setObject:version forKey:@"oldversion"];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSUserDefaults standardUserDefaults] synchronize];
    for (id subViews in self.view.subviews) {
        [subViews removeFromSuperview];
    }
    [self.view removeFromSuperview];
    [self removeFromParentViewController];
//    [((AppDelegate *)[UIApplication sharedApplication].delegate) setRootViewController];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (BOOL)shouldAutorotate {
    [super shouldAutorotate];
    return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    [super supportedInterfaceOrientations];
    return UIInterfaceOrientationMaskPortrait;
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
